import Vue from 'vue';
import App from './App';
import VueRouter from 'vue-router';
import store from './vuex/index';
import axios from 'axios';
import VueAwesomeSwiper from 'vue-awesome-swiper';
import routes from './routes';
import ElementUI from 'element-ui';
// import 'babel-polyfill';
import 'element-ui/lib/theme-chalk/index.css';
import './common/css/iconfont.css';
Vue.prototype.$http = axios;
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(VueAwesomeSwiper);
const router = new VueRouter({
    routes
});
router.beforeEach((to, from, next) => {
    /* 路由发生变化修改页面title */
    if (to.meta.title) {
      document.title = `上海佛教网--${to.meta.title}`;
    }
    next();
  });
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');